﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'GetIDDocumentoByTipoGuia')
	BEGIN
		DROP  Procedure  GetIDDocumentoByTipoGuia
	END

GO

CREATE Procedure GetIDDocumentoByTipoGuia

	(
		@tipo int
	)


AS
begin

SELECT     IdDocumento
FROM       dbo.GuiaRemision
where      TipoGuia=@tipo
end

GO


GRANT EXEC ON GetIDDocumentoByTipoGuia TO PUBLIC

GO


